package grade;

import java.util.Scanner;

public class StudentNode {
    public int ranking; //序号
    public int number; //学号

    public String name;
    public double chinese;
    public double math;
    public double english;
    public double  sum;




        public StudentNode(){      //无参数时的构造函数
            this(0,0,null, 0.0, 0.0, 0.0,0.0);
        }
        public StudentNode(int ranking,int number,String name,double chinese,double math,double english,double  sum){
            this.ranking=ranking;
            this.number=number;
            this.name=name;
            this.chinese = chinese;

            this.math=math;
            this.english=english;
            this.sum=sum;
        }
        public StudentNode(Scanner sc){

            this(sc.nextInt(),sc.nextInt(),sc.next(), sc.nextDouble(),  sc.nextDouble() ,sc.nextDouble(), sc.nextDouble());
        }
    }



